﻿using System;

namespace Salary.Domain
{
    public class Employee : Entity
    {
        private string _name;
        private string _contacts;
        private int _rate;
        private Position _position;

        #region Costructor

        protected Employee ()
        {
            
        }
        public Employee(string name, string contacts, int rate, Position position)
        {
            _name = name;
            _contacts = contacts;
            _rate = rate;
            _position = position;
        }
        #endregion

        #region Methods
        public virtual Timesheet CreateTimesheet(DateTime date, decimal hours, bool overWork)
        {
            return new Timesheet(this, date, hours, overWork);
        }
        #endregion

        #region Properties

        public virtual string Name
        {
            get { return _name; }
            set { _name = value; }
        }        
        public virtual string Contacts
        {
            get { return _contacts; }
            set { _contacts = value; }
        }        
        public virtual int Rate
        {
            get { return _rate; }
            set { _rate = value; }
        }        
        public virtual Position Position
        {
            get { return _position; }
            set { _position = value; }
        }
        #endregion
    }
}
